Skip to content

fix: report all golangci-lint issues regardless of diff#6622

Merged
Warashi merged 2 commits intopipe-cd:masterfrom
majiayu000:fix/issue-6621-lint-filter-mode
Mar 28, 2026
Merged

fix: report all golangci-lint issues regardless of diff#6622
Warashi merged 2 commits intopipe-cd:masterfrom
majiayu000:fix/issue-6621-lint-filter-mode

Conversation

@majiayu000
Copy link
Copy Markdown
Contributor

What this PR does:

Adds filter_mode: nofilter to the reviewdog/action-golangci-lint step in the lint workflow. This makes reviewdog report all golangci-lint findings, not just those on lines added in the PR diff.

Why we need it:

reviewdog's default filter_mode is added, which only reports issues on newly added lines. gofmt violations are reported at line 1 of the file, not at the actual offending line, so they get silently filtered out on PRs. The lint check passes on the PR, but then fails on master after merge.

Which issue(s) this PR fixes:

Fixes #6621

Does this PR introduce a user-facing change?:

  • How are users affected by this change: CI lint checks will now catch all golangci-lint issues (including gofmt) on PRs, preventing broken builds on master after merge.
  • Is this breaking change: No
  • How to migrate (if breaking change): N/A

Set filter_mode to nofilter in reviewdog/action-golangci-lint so that
gofmt issues on unchanged lines are not silently skipped during PR
checks.

Fixes pipe-cd#6621

Signed-off-by: majiayu000 <1835304752@qq.com>
@Warashi Warashi self-requested a review March 28, 2026 03:57
@Warashi
Copy link
Copy Markdown
Member

Warashi commented Mar 28, 2026

Thank you!
The lint at k8s_multicluster is successfully (?) failed.
So it worked as expected.

@Warashi
Copy link
Copy Markdown
Member

Warashi commented Mar 28, 2026

It's better if we can check on the PR what issue is raised, but it's nice to have, not mandatory.
@majiayu000 Do you have any idea about this?

@majiayu000
Copy link
Copy Markdown
Contributor Author

@Warashi I will work on it, thanks

Fix gofmt formatting in application.go and canary_test.go, and
remove unused namespace param in baselineDeployment test helper.

Signed-off-by: majiayu000 <1835304752@qq.com>
Copy link
Copy Markdown
Member

@Warashi Warashi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@majiayu000
Thank you. This PR is LGTM, so I'm going to merge.

BTW, do you have any idea to view the lint errors on the PR diffs view or as PR comments?
It's better to be able to view lint errors on PR, not the actions run logs.

@Warashi Warashi merged commit e95a44b into pipe-cd:master Mar 28, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: make lint failure at PR checks if there are any issues

2 participants